package com.example.factory_demo.factory.simplefactory;

import com.example.factory_demo.ICourse;

public class SimpleCourseFactory {

    public ICourse createCourse(Class clazz) {
        try {
            return (ICourse) clazz.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
